package com.danco.training.zaneuskaya.view;

import com.danco.training.zaneuskaya.view.action.Action;

public class MenuItem {

	private Action action;
	private String title;
	private Menu menu;

	public MenuItem(Action action, String title, Menu menu) {

		this.action = action;
		this.title = title;
		this.menu = menu;
	}

	public void doAction() {
		action.execute();
	}

	public Action getAction() {
		return action;
	}

	public void setAction(Action action) {
		this.action = action;
	}

	public String getTitle() {
		return title;
	}

	public Menu getMenu() {
		return menu;
	}

	public String toString() {
		return this.getTitle();
	}

}
